From: Rob Church Date: Wed, 26 Apr 2006 09:30:31 +0000 (+0000) Subject: Pass login link to "whitelistedittext" containing 'returnto' parameter X-Git-Tag: 1.31.0-rc.0~57368 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=632454859087d77d10c7537a1c7226b163ce78ab;p=lhc%2Fweb%2Fwiklou.git Pass login link to "whitelistedittext" containing 'returnto' parameter --- diff --git a/includes/EditPage.php b/includes/EditPage.php index d8c4b6f5a9..e6ecac1c4c 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1313,13 +1313,16 @@ END * @todo document */ function userNotLoggedInPage() { - global $wgOut; - + global $wgUser, $wgOut; + $skin = $wgUser->getSkin(); + $loginTitle = Title::makeTitle( NS_SPECIAL, 'Userlogin' ); + $loginLink = $skin->makeKnownLinkObj( $loginTitle, wfMsgHtml( 'loginreqlink' ), 'returnto=' . $this->mTitle->getPrefixedText() ); + $wgOut->setPageTitle( wfMsg( 'whitelistedittitle' ) ); $wgOut->setRobotpolicy( 'noindex,nofollow' ); $wgOut->setArticleRelated( false ); - - $wgOut->addWikiText( wfMsg( 'whitelistedittext' ) ); + + $wgOut->addHtml( wfMsgWikiHtml( 'whitelistedittext', $loginLink ) ); $wgOut->returnToMain( false ); } diff --git a/languages/Messages.php b/languages/Messages.php index 17b0fc1f28..6cd24ab64e 100644 --- a/languages/Messages.php +++ b/languages/Messages.php @@ -371,6 +371,7 @@ Your account has been created. Don't forget to change your {{SITENAME}} preferen 'alreadyloggedin' => "User $1, you are already logged in!
", 'login' => 'Log in', +'loginshort' => 'log in', 'loginprompt' => 'You must have cookies enabled to log in to {{SITENAME}}.', 'userlogin' => 'Log in / create account', 'logout' => 'Log out', @@ -481,7 +482,7 @@ Note that you may not use the "e-mail this user" feature unless you have a valid Your IP address is $3. Please include this address in any queries you make.', 'whitelistedittitle' => 'Login required to edit', -'whitelistedittext' => 'You have to [[Special:Userlogin|login]] to edit pages.', +'whitelistedittext' => 'You have to $1 to edit pages.', 'whitelistreadtitle' => 'Login required to read', 'whitelistreadtext' => 'You have to [[Special:Userlogin|login]] to read pages.', 'whitelistacctitle' => 'You are not allowed to create an account', @@ -489,7 +490,7 @@ Your IP address is $3. Please include this address in any queries you make.', 'confirmedittitle' => 'E-mail confirmation required to edit', 'confirmedittext' => 'You must confirm your e-mail address before editing pages. Please set and validate your e-mail address through your [[Special:Preferences|user preferences]].', 'loginreqtitle' => 'Login Required', -'loginreqlink' => 'login', +'loginreqlink' => 'log in', 'loginreqpagetext' => 'You must $1 to view other pages.', 'accmailtitle' => 'Password sent.', 'accmailtext' => 'The password for "$1" has been sent to $2.',